class Person {
    // 会有默认的修饰符
    public name: string
    age: number
    constructor(name:string, age:number) {
        this.name = name
        this.age = age
    }
}


class Student extends Person{
    className:string
    constructor(name: string, age: number, className: string) {
        super(name, age)
        this.className = className
    }
}


// 简写
class PersonNext {
    constructor(public name: string, public age: number) {}
}
const person1 = new Person('小米', 20)

const student1 = new Student('小米', 20, '一年级一班')